package factory;

public abstract class ThemeFactory {
    abstract Button createButton();

    abstract List createList();
}

class GreenThemeFactory extends ThemeFactory {
    Button createButton() {
        return new GreenButton();
    }

    List createList() {
        return new GreenList();
    }
}

class RedThemeFactory extends ThemeFactory {
    Button createButton() {
        return new RedButton();
    }

    List createList() {
        return new RedList();
    }
}

//button
abstract class Button {
    abstract void paint();
}

class GreenButton extends Button {
    void paint() {

    }
}

class RedButton extends Button {
    void paint() {

    }
}

//List
abstract class List {
    abstract void paint();
}

class GreenList extends List {
    void paint() {

    }
}

class RedList extends List {
    void paint() {

    }
}



